<script>
  fetch("/web/session/get_session_info", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify({}),
    credentials: "include", // 保证 cookie 携带
  })
    .then((res) => res.json())
    .then((data) => {
      console.log("当前用户信息：", data);
      // data.result.uid, data.result.user_context, etc
    });
</script>
